const proxyTableList = [
  { prefix: '/test', target: 'http://47.115.210.145:8080/' },
  { prefix: '/online', target: 'http://114.55.251.34:8080/' },
  { prefix: '/dev/mock', target: 'http://localhost:8080' },
]
const proxyTable = {}
proxyTableList.forEach(item => {
  proxyTable[`^${item.prefix}`] = {
    target: item.target,
    secure: false,
    changeOrigin: true,
    rewrite: (path) => path.replace(item.prefix, '')
  }
})

module.exports = proxyTable
